package com.weiwei.diancan.adapter;

import com.weiwei.diancan.R;
import com.weiwei.diancan.bean.OrderWapper;

import java.util.List;

import weiwei.com.weiweilibrary.adapter.BaseQuickAdapter;
import weiwei.com.weiweilibrary.holder.BaseViewHolder;

/**
 * Created by BMW on 2016/11/24.
 */
public class AllOrderAdapter extends BaseQuickAdapter<OrderWapper> {

    public AllOrderAdapter(List<OrderWapper> data) {
        super(R.layout.item_all_order, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, OrderWapper item, int position) {
        helper.setText(R.id.tv_no,item.getOrder_no());
        helper.setText(R.id.tv_time,item.getTime());
        helper.setText(R.id.tv_people,item.getTab_name()+"("+item.getTab_people()+"/"+item.getTab_max_people()+")");
        helper.setText(R.id.tv_price,"¥"+item.getOrder_price());
    }
}
